package com.tunxing.创建型.单例设计模式;

public class 双重校验锁 {
    public volatile static Person person;

    public static Person getPerson() {
        if (person == null) {
            synchronized (双重校验锁.class) {
                if (person == null) {
                    person = new Person();
                }
            }
        }
        return person;
    }
}
